package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbUsuaTabla generated by hbm2java
 */
@Entity
@Table(name = "TB_USUA_TABLA", schema = "CATALOGOS")
public class TbUsuaTabla implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private TbUsuaTablaId id;
	private TbTabla tbTabla;
	private String cusuario;
	private Integer bstatus;
	private Integer bescritura;
	private Date fhingreso;

	public TbUsuaTabla() {
	}

	public TbUsuaTabla(TbUsuaTablaId id, TbTabla tbTabla, String cusuario,
			Integer bstatus, Integer bescritura, Date fhingreso) {
		this.id = id;
		this.tbTabla = tbTabla;
		this.cusuario = cusuario;
		this.bstatus = bstatus;
		this.bescritura = bescritura;
		this.fhingreso = fhingreso;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "cusuarioTb", column = @Column(name = "C_USUARIO_TB", nullable = false, length = 30)),
			@AttributeOverride(name = "ctablaTb", column = @Column(name = "C_TABLA_TB", nullable = false, length = 18)) })
	public TbUsuaTablaId getId() {
		return this.id;
	}

	public void setId(TbUsuaTablaId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_TABLA_TB", nullable = false, insertable = false, updatable = false)
	public TbTabla getTbTabla() {
		return this.tbTabla;
	}

	public void setTbTabla(TbTabla tbTabla) {
		this.tbTabla = tbTabla;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

	@Column(name = "B_ESCRITURA", nullable = false, precision = 1, scale = 0)
	public Integer getBescritura() {
		return this.bescritura;
	}

	public void setBescritura(Integer bescritura) {
		this.bescritura = bescritura;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

}
